<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreatePanxAssetsTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('panx_assets', function(Blueprint $table)
		{
			$table->increments('id');
			$table->integer('type')->comment('素材类型 参考 panx_asset_types 表');
			$table->string('name')->comment('画法名称');
			$table->text('thumb_img', 65535)->comment('缩略图地址');
			$table->text('texture_imgs', 65535)->comment('贴图图片数组');
			$table->text('alpha_array', 65535)->nullable()->comment('贴图透明度JSON数组');
			$table->boolean('is_deleted')->default(0)->comment('是否删除不显示');
			$table->integer('priority')->unsigned()->default(0)->comment('优先级');
			$table->timestamps();
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('panx_assets');
	}

}
